<?php
/**
 * @ Fmash Top System
 * @ version: 3.0
 * @ author: i.coffee.smile@mail.com
 * @ date:2011-1-27
 * @ file:see.php $8
 */
session_start();
include_once 'class_mysql.php';
include_once 'function_math.php';

$sid = de_see($_GET['c']);

if($sid > 0 && $sid < 10000)
{
	$sql = "UPDATE `$top_man` SET `win` = `win` + 1 WHERE `id` = '$sid'";
	if($_SESSION['lastsee'] == "$sid")
	{
		$error = rawurlencode('对不起，请不要连续提交！');
		header("location:error.php?error=$error");
		exit();
	}else{
		mysql_query($sql);
		unset($_SESSION['lastsee']);
	}
	$_SESSION['lastsee'] = "$sid";
	header("location:show.php?id=$sid");
}else{
	$error = rawurlencode('你的链接地址有误，链接为系统生成，请勿修改！');
	header("location:error.php?error=$error");
	exit();
}
